fourT

library(fourT)

Introduction

The 4T study is a team-based, technology drive type 1 diabetes management program at Stanford. The 4T study consists of multiple states. The 4T study began with Pilot 4T (2018-2020). Associated with this is 4T Pilot and Pre-Pilot Study Database. 4T Study 1 followed (May 2021 - present) and then 4T Study 2 (March 2022 - ). The 4T Study 1 “assessed the impact of a systematic and equitable digital-health-team-based care program implementing tighter glucose targets (HbA1c < 7%), early technology use (continuous glucose monitoring starts <1 month after diagnosis) and remote patient monitoring on glycemia in young people with newly diagnosed T1D enrolled in the Teamwork, Targets, Technology, and Tight Control”1. The primary outcome for 4T Study 1 was change in HbA1c from 4 to 12 months after diagnosis. The secondary outcome was achieving HbA1c targets. There are some common metrics and visuals computed with continuous glucose monitoring (CGM data):

fourT Package Aim and Overview

There are many people involved in 4T. Many of these people use different code to compute the various metrics associated with the 4T study. The fourT package aims to homogenize computation and visualization methods, enable quicker workflow and enable easier collaboration with other institutions.

There are three groups of functions in the fourT package, computation functions, visualization functions and helper functions. All functions in the fourT package operate on two types of objects, individual patients and cohorts. An individual patient is a single patient’s dexcom data (.csv) file. A cohort is a collection of individual patients stored in a single folder.

Example Workflow

To use the fourT package the user must first read the patient file using the ‘read_dexcom’ function.

  df_dex1 <- read_dexcom("~/Desktop/R Workspace/4T/external files/4T.999_Clarity_Export_00999_Doe_John_2024-07-05_091012.csv")

This cleans entries which may have the date-time incorrectly inputted (i.e. NA values) and reformats the data. The ‘read_dexcom’ function can also optionally remove PHI and randomize the year to deidentify the data; this is controlled by the ‘deid’ parameter.

bg_date_time bg_value_num record_id bg_value_flag
2021-05-06 15:59:58 288 091012 NA
2021-05-06 16:04:58 281 091012 NA
2021-05-06 16:09:58 274 091012 NA
2021-05-06 16:19:58 273 091012 NA
2021-05-06 16:24:58 278 091012 NA
2021-05-06 16:29:58 283 091012 NA
2021-05-06 16:34:58 283 091012 NA
2021-05-06 16:44:58 277 091012 NA
2021-05-06 16:49:58 275 091012 NA
2021-05-06 16:54:58 273 091012 NA
2021-05-06 16:59:58 270 091012 NA
2021-05-06 17:04:58 269 091012 NA
2021-05-06 17:09:58 265 091012 NA
2021-05-06 17:54:58 289 091012 NA
2021-05-06 17:59:59 278 091012 NA
2021-05-06 18:04:58 262 091012 NA
2021-05-06 18:09:58 258 091012 NA
2021-05-06 18:14:58 258 091012 NA
2021-05-06 18:19:58 253 091012 NA
2021-05-06 18:24:59 249 091012 NA

The default setting of ‘read_dexcom’ is with ‘deid = FALSE’, i.e. without deidentification. This reflects usage inside of the QSU where deidenitfying the data may not be an issue. When working with outside collaborators the deidentification can be switched on by setting the ‘deid’ parameter to TRUE.

  df_dex2 <- read_dexcom("~/Desktop/R Workspace/4T/external files/4T.999_Clarity_Export_00999_Doe_John_2024-07-05_091012.csv", deid = T)
bg_date_time bg_value_num record_id bg_value_flag
2077-05-06 15:59:58 288 091012 NA
2077-05-06 16:04:58 281 091012 NA
2077-05-06 16:09:58 274 091012 NA
2077-05-06 16:19:58 273 091012 NA
2077-05-06 16:24:58 278 091012 NA
2077-05-06 16:29:58 283 091012 NA
2077-05-06 16:34:58 283 091012 NA
2077-05-06 16:44:58 277 091012 NA
2077-05-06 16:49:58 275 091012 NA
2077-05-06 16:54:58 273 091012 NA

After reading the patient file, any of the computation or visualization functions can be applied independently. For example, the user could compute wear time, AGP thermoemters and GMI every 14 days, with a 90 day lookback window.

  compute_agp(df_dex1, freq = 14)
#> [1] "Time interval 1 does not have enough data, values set to NA"
#> [1] "Time interval 2 does not have enough data, values set to NA"
#> # A tibble: 28 × 6
#>        n    tbr2     tbr    tar    tar2    tir
#>    <int>   <dbl>   <dbl>  <dbl>   <dbl>  <dbl>
#>  1    87 NA      NA      NA     NA      NA    
#>  2  2646 NA      NA      NA     NA      NA    
#>  3  6601  0.0103  0.0721  0.200  0.0530  0.728
#>  4  8194  0.0101  0.0832  0.182  0.0428  0.734
#>  5 10366  0.0346  0.108   0.236  0.0820  0.656
#>  6 10366  0.0346  0.108   0.236  0.0820  0.656
#>  7 12063  0.0384  0.112   0.263  0.0958  0.625
#>  8 12343  0.0429  0.120   0.319  0.113   0.561
#>  9 13738  0.0451  0.128   0.357  0.143   0.515
#> 10 14389  0.0491  0.124   0.415  0.165   0.461
#> # ℹ 18 more rows
  compute_gmi(df_dex1, freq = 14)
#> [1] "Time interval 1 does not have enough data, values set to NA"
#> [1] "Time interval 2 does not have enough data, values set to NA"
#>     bg_mean bg_total      gmi     n
#> 1        NA       NA       NA    NA
#> 2        NA       NA       NA    NA
#> 3  135.3048   893147 6.546491  6601
#> 4  132.1153  1082553 6.470199  8194
#> 5  140.0645  1451909 6.660344 10366
#> 6  140.0645  1451909 6.660344 10366
#> 7  144.4780  1742838 6.765914 12063
#> 8  152.8727  1886908 6.966715 12343
#> 9  158.8904  2182836 7.110658 13738
#> 10 167.5433  2410781 7.317636 14389
#> 11 159.8004  2866021 7.132427 17935
#> 12 150.1126  2739555 6.900693 18250
#> 13 144.7340  3218885 6.772038 22240
#> 14 144.9558  3627809 6.777343 25027
#> 15 139.6998  3524905 6.651619 25232
#> 16 136.0809  3427605 6.565054 25188
#> 17 135.9112  3427272 6.560995 25217
#> 18 134.0086  3373800 6.515485 25176
#> 19 136.8940  3484089 6.584504 25451
#> 20 136.0141  3448501 6.563457 25354
#> 21 137.2981  3490256 6.594171 25421
#> 22 137.2221  3491478 6.592352 25444
#> 23 138.8988  3531364 6.632460 25424
#> 24 143.0435  3654189 6.731600 25546
#> 25 144.9528  3684120 6.777271 25416
#> 26 145.0307  3697847 6.779134 25497
#> 27 144.1629  3674568 6.758376 25489
#> 28 146.0801  3731763 6.804237 25546
  compute_wear_time(df_dex1)
#> # A tibble: 383 × 5
#>    date       day_number     n wear_prop total_wear_prop
#>    <date>          <dbl> <int>     <dbl> <chr>          
#>  1 2021-05-07          0   287     0.997 <NA>           
#>  2 2021-05-08          1   288     1     <NA>           
#>  3 2021-05-09          2   288     1     <NA>           
#>  4 2021-05-10          3   288     1     <NA>           
#>  5 2021-05-11          4   288     1     <NA>           
#>  6 2021-05-12          5   288     1     <NA>           
#>  7 2021-05-13          6   288     1     <NA>           
#>  8 2021-05-14          7   288     1     <NA>           
#>  9 2021-05-15          8   100     0.347 <NA>           
#> 10 2021-05-16          9    NA    NA     <NA>           
#> # ℹ 373 more rows

There are multiple different options for breaking up the time window for each function.

  compute_agp(df_dex1, freq = 14)
#> [1] "Time interval 1 does not have enough data, values set to NA"
#> [1] "Time interval 2 does not have enough data, values set to NA"
#> # A tibble: 28 × 6
#>        n    tbr2     tbr    tar    tar2    tir
#>    <int>   <dbl>   <dbl>  <dbl>   <dbl>  <dbl>
#>  1    87 NA      NA      NA     NA      NA    
#>  2  2646 NA      NA      NA     NA      NA    
#>  3  6601  0.0103  0.0721  0.200  0.0530  0.728
#>  4  8194  0.0101  0.0832  0.182  0.0428  0.734
#>  5 10366  0.0346  0.108   0.236  0.0820  0.656
#>  6 10366  0.0346  0.108   0.236  0.0820  0.656
#>  7 12063  0.0384  0.112   0.263  0.0958  0.625
#>  8 12343  0.0429  0.120   0.319  0.113   0.561
#>  9 13738  0.0451  0.128   0.357  0.143   0.515
#> 10 14389  0.0491  0.124   0.415  0.165   0.461
#> # ℹ 18 more rows
  compute_gmi(df_dex1, breaks = c(0, 1, 3, 6, 7.5, 9, 12))
#> # A tibble: 6 × 4
#>   inter bg_mean bg_total   gmi
#>   <int>   <dbl>    <dbl> <dbl>
#> 1     1    135.   962505  6.53
#> 2     2    161.   914160  7.17
#> 3     3    145.  3651254  6.78
#> 4     4    138.  1743626  6.61
#> 5     5    134.  1736416  6.51
#> 6     6    145.  3719327  6.77
  compute_wear_time(df_dex1, start = , end = )
#> # A tibble: 383 × 5
#>    date       day_number     n wear_prop total_wear_prop
#>    <date>          <dbl> <int>     <dbl> <chr>          
#>  1 2021-05-07          0   287     0.997 <NA>           
#>  2 2021-05-08          1   288     1     <NA>           
#>  3 2021-05-09          2   288     1     <NA>           
#>  4 2021-05-10          3   288     1     <NA>           
#>  5 2021-05-11          4   288     1     <NA>           
#>  6 2021-05-12          5   288     1     <NA>           
#>  7 2021-05-13          6   288     1     <NA>           
#>  8 2021-05-14          7   288     1     <NA>           
#>  9 2021-05-15          8   100     0.347 <NA>           
#> 10 2021-05-16          9    NA    NA     <NA>           
#> # ℹ 373 more rows

If one would like to instead compute all of these metrics at the same time, with the same time window partition they can simply call the wrapping function ‘cgm_summaries()’.

  cgm_summaries(df_dex1, breaks = c(0, 1, 3, 6, 7.5, 9, 12))
#> New names:
#> • `inter` -> `inter...1`
#> • `inter` -> `inter...8`
#> # A tibble: 6 × 11
#>   inter...1     n    tbr2    tbr   tar   tar2   tir inter...8 bg_mean bg_total
#>       <int> <int>   <dbl>  <dbl> <dbl>  <dbl> <dbl>     <int>   <dbl>    <dbl>
#> 1         1  7153 0.00951 0.0762 0.192 0.0489 0.731         1    135.   962505
#> 2         2  5663 0.0828  0.166  0.380 0.168  0.454         2    161.   914160
#> 3         3 25202 0.0314  0.120  0.272 0.0947 0.608         3    145.  3651254
#> 4         4 12635 0.0293  0.110  0.233 0.0624 0.657         4    138.  1743626
#> 5         5 12984 0.0281  0.0860 0.188 0.0323 0.727         5    134.  1736416
#> 6         6 25705 0.0149  0.0678 0.248 0.0642 0.684         6    145.  3719327
#> # ℹ 1 more variable: gmi <dbl>

This function can also be used to simultaneously create the AGP thermometer stacked bar plot, by setting ‘plot = T’ (the above tabular output is hidden when cgm_summaries() is called below).

  cgm_summaries(df_dex1, breaks = c(0, 1, 3, 6, 7.5, 9, 12), plot = T)

A similar workflow works for cohorts. The user should first read the cohort data using the ‘read_cohort_dexcom’ function.

df_cohort_dex <- read_cohort_dexcom("~/Desktop/R Workspace/4T/external files/cohort-ex")
bg_date_time bg_value_num record_id bg_value_flag
2021-05-06 15:59:58 288 091012 NA
2021-05-06 15:59:58 288 091399 NA
2021-05-06 15:59:58 288 987654 NA
2021-05-06 16:04:58 281 091012 NA
2021-05-06 16:04:58 281 091399 NA
2021-05-06 16:04:58 281 987654 NA
2021-05-06 16:09:58 274 091012 NA
2021-05-06 16:09:58 274 091399 NA
2021-05-06 16:09:58 274 987654 NA
2021-05-06 16:19:58 273 091012 NA
2021-05-06 16:19:58 273 091399 NA
2021-05-06 16:19:58 273 987654 NA
2021-05-06 16:24:58 278 091012 NA
2021-05-06 16:24:58 278 091399 NA
2021-05-06 16:24:58 278 987654 NA
2021-05-06 16:29:58 283 091012 NA
2021-05-06 16:29:58 283 091399 NA
2021-05-06 16:29:58 283 987654 NA
2021-05-06 16:34:58 283 091012 NA
2021-05-06 16:34:58 283 091399 NA

‘read_cohort_dexcom’ may take more than just the filepath as input. It also uses two paraemters ‘indiv’ and ‘ordered’. ‘indiv’ determines whether patient files should be read into seperate data frames, or one large data frame. ‘ordered’ is used only when ‘indiv’ = FALSE. If ‘ordered’ = TRUE then the combined data frame rows are rearranged in chronological order. If ‘ordered’ = FALSE then the combined data frame remains seperated by patient. When ‘indiv’ is FALSE, ‘read_cohort_dexcom’ returns a list of data frames.

After reading the cohort dexcom data, the user can use the cohort cgm_summaries function ‘cohort_cgm_summaries’ to compute the same summaries at the cohort level. ‘cohort_cgm_summaries’ takes the same parameters as the patient ‘cgm_summaries’ functions, along with the parameters added to the ‘read_cohort_dexcom’ function. The user can again choose whether to plot the AGP thermometers.

  cohort_cgm_summaries(df_cohort_dex, breaks = c(0, 1, 3, 6, 7.5, 9, 12), plot = T)
#> New names:
#> • `inter` -> `inter...1`
#> • `inter` -> `inter...8`
inter…1 n tbr2 tbr tar tar2 tir inter…8 bg_mean bg_total gmi
1 21459 0.0095065 0.0761918 0.1923668 0.0489305 0.7314414 1 134.5596 2887515 6.528666
2 16989 0.0828183 0.1663429 0.3796574 0.1675790 0.4539996 2 161.4268 2742480 7.171329
3 75606 0.0313864 0.1201492 0.2718435 0.0946750 0.6080073 3 144.8795 10953762 6.775518
4 37905 0.0292837 0.1096953 0.2332410 0.0623664 0.6570637 4 137.9997 5230878 6.610952
5 38952 0.0281115 0.0859519 0.1875385 0.0323475 0.7265096 5 133.7351 5209248 6.508943
6 77115 0.0148998 0.0677689 0.2478895 0.0641509 0.6843416 6 144.6927 11157981 6.771051

Documentation

?compute_gmi
R: Compute glucose management indicator (GMI)
compute_gmiR Documentation

Compute glucose management indicator (GMI)

Description

Computes the GMI for a given patient. The formula for GMI comes from: https://diabetesjournals.org/care/article/42/4/e60/36083/Glucose-Management-Indicator-GMI-Insights-and

Usage

compute_gmi(
  df_dex,
  start = "default",
  end = "default",
  lookback = 90,
  freq = NULL,
  breaks = NULL,
  include_bv = TRUE
)

Arguments

df_dex

Data frame outputted by read_dexcom

start

Date-time. Computation window start date. Value of "default" means function ignores this parameter and computes up to the start of the data.

end

Date-time. Computation window end date. Value of "default" means function ignores this parameter and computes up to the start of the data.

lookback

Number of days to look back for GMI computations. Defaults to 90 days.

freq

Time interval for computation; e.g. every 14 days, every month, etc.

breaks

Vector. Specify range computations manually, e.g. c(0, 1, 4.5, 7.5, 10.5, 13.5) would report values at study months 0, 1, 4.5, 7.5, 10.5, and 13.5.

include_bv

If TRUE, "High" and "Low" flags are converted to value 400 and 40 respectively and used in computations. If FALSE, this conversion does not happen; computations ignore the "High" and "Low" flags.

Value

Data frame with GMI metrics

Examples

bg_date_time <- as.POSIXct(c("2020-01-01 01:01:01", "2020-03-01 01:01:01",
"2020-06-01 01:01:01", "2020-07-01 01:01:01", "2020-09-09 01:01:01", "2020-12-09 01:01:01",
"2021-01-01 01:01:01"), tz = "UTC")
bg_value_num <- c(67, 100, 150, 123, 124, 80, 300)
record_id <- c(010101, 010101, 010101, 010101, 010101, 010101, 010101)
bg_value_flag <- c(NA, NA, NA, NA, NA, NA, NA)


df <- dplyr::tibble(bg_date_time = bg_date_time, bg_value_num = bg_value_num, record_id = record_id,
bg_value_flag = bg_value_flag)

compute_gmi(df, breaks = c(0, 1.5, 4.5, 7, 10, 13))
?compute_agp
R: Compute AGP Thermometers
compute_agpR Documentation

Compute AGP Thermometers

Description

Compute AGP Thermometers

Usage

compute_agp(
  df_dex,
  start = "default",
  end = "default",
  lookback = 90,
  freq = NULL,
  breaks = NULL,
  include_bv = TRUE
)

Arguments

df_dex

Data frame outputted by read_dexcom.

start

Date-time. Computation window start date. Value of "default" means function ignores this parameter and computes up to the start of the data.

end

Date-time. Computation window end date. Value of "default" means function ignores this parameter and computes up to the start of the data.

lookback

Number of days to look back for GMI computations. Defaults to 90 days.

freq

Time interval for computation; e.g. every 14 days, every month, etc.

breaks

Vector. Specify range computations manually, e.g. c(0, 1, 4.5, 7.5, 10.5, 13.5) would report values at study months 0, 1, 4.5, 7.5, 10.5, and 13.5.

include_bv

If TRUE, "High" and "Low" flags are converted to value 400 and 40 respectively and used in computations. If FALSE, this conversion does not happen; computations ignore the "High" and "Low" flags.

Value

Data frame with AGP metrics

Examples

bg_date_time <- as.POSIXct(c("2020-01-01 01:01:01", "2020-03-01 01:01:01",
"2020-06-01 01:01:01", "2020-07-01 01:01:01", "2020-09-09 01:01:01", "2020-12-09 01:01:01",
"2021-01-01 01:01:01"), tz = "UTC")
bg_value_num <- c(67, 100, 150, 123, 124, 80, 300)
record_id <- c(010101, 010101, 010101, 010101, 010101, 010101, 010101)
bg_value_flag <- c(NA, NA, NA, NA, NA, NA, NA)


df <- dplyr::tibble(bg_date_time = bg_date_time, bg_value_num = bg_value_num, record_id = record_id,
bg_value_flag = bg_value_flag)
compute_agp(df, breaks = c(0, 1.5, 4.5, 7, 10, 13))
?read_dexcom
R: Reads Dexcom data
read_dexcomR Documentation

Reads Dexcom data

Description

Reads a patient.csv file and reformats the data. Optionally deidentifies the data. The input should either be a full filepath, or the user should set their working directory to the local folder and then supply the filename (with the .csv ending, necessary for read-dexcom functioning properly).

Usage

read_dexcom(x, col_spec = FALSE, deid = F)

Arguments

x

Filepath.

Value

Date frame. Four columns: 'bg_date_time', 'bg_value_num', 'record_id', 'bg_value_flag'. 'bg_date_time' consists of the processed date times, each entry is a POSIXct object. 'bg_value_num' consists of numeric blood glucose measurements which fall in the 40-400 range, each entry is a string which needs to be converted to numeric if user wants to manipulate independently; fourT package functions do this automatically. If blood glucose values exceed the 40-400 range limits they are flagged "High" or "Low". 'bg_value_flag' records these flagged observations with "High" and "Low" values. If the observation is not flagged, then its 'bg_value_flag' value is NA.

?plot_agp
R: Canonical bar plot for AGP Thermometers
plot_agpR Documentation

Canonical bar plot for AGP Thermometers

Description

Canonical bar plot for AGP Thermometers

Usage

plot_agp(
  df_dex,
  start = "default",
  end = "default",
  lookback = 90,
  freq = NULL,
  breaks = NULL
)

Arguments

df_dex

Data frame outputted by read_dexcom

start

Date-time. Computation window start date. Value of "default" means function ignores this parameter at computes up to the start of the data.

end

Date-time. Computation window end date. Value of "default" means function ignores this parameter at computes up to the start of the data.

inter

time interval

?cgm_summaries
R: Computes all metrics
cgm_summariesR Documentation

Computes all metrics

Description

Computes AGP thermometers, GMI and average glucose with the option to create the AGP thermometers plot by calling each of the respective individual function. Like the other computation only one of 'freq' and 'breaks' may be specified. Start and end dates may also be specified. It is recommended that this is only used when the data is not deidentified. There is also the option to not include boundary values.

Usage

cgm_summaries(
  df_dex,
  start = "default",
  end = "default",
  lookback = 90,
  freq = NULL,
  breaks = NULL,
  include_bv = T,
  plot = F
)

Arguments

df_dex

Data frame outputted by read_dexcom

start

Date-time. Computation window start date. Value of "default" means function ignores this parameter and computes up to the start of the data.

end

Date-time. Computation window end date. Value of "default" means function ignores this parameter and computes up to the start of the data.

lookback

Number of days to look back for GMI computations. Defaults to 90 days.

freq

Time interval for computation; e.g. every 14 days, every month, etc.

breaks

Vector. Specify range computations manually, e.g. c(0, 1, 4.5, 7.5, 10.5, 13.5) would report values at study months 0, 1, 4.5, 7.5, 10.5, and 13.5.

include_bv

If TRUE, "High" and "Low" flags are converted to value 400 and 40 respectively and used in computations. If FALSE, this conversion does not happen; computations ignore the "High" and "Low" flags.

Value

Data frame. Will print AGP plot if requested.

Examples

bg_date_time <- as.POSIXct(c("2020-01-01 01:01:01", "2020-03-01 01:01:01",
"2020-06-01 01:01:01", "2020-07-01 01:01:01", "2020-09-09 01:01:01", "2020-12-09 01:01:01",
"2021-01-01 01:01:01"), tz = "UTC")
bg_value_num <- c(67, 100, 150, 123, 124, 80, 300)
record_id <- c(010101, 010101, 010101, 010101, 010101, 010101, 010101)
bg_value_flag <- c(NA, NA, NA, NA, NA, NA, NA)


df <- dplyr::tibble(bg_date_time = bg_date_time, bg_value_num = bg_value_num, record_id = record_id,
bg_value_flag = bg_value_flag)
cgm_summaries(df, breaks = c(0, 1.5, 4.5, 7, 10, 13), plot = F)

Package Structure

Computation Functions

There are four computation functions: ‘compute_gmi’, ‘compute_agp’, ‘compute_wear_time’, and ‘compute_avg_glucose’. Each computation function operates without reference to another, except for ‘compute_gmi’, which calls ‘compute_avg_glucose’; the ‘compute_avg_glucose’ function can also be called independently by the user.

Time control parameters: There are three primary ways in which to time window for computation can be modified:

  1. ‘start’ and ‘end’ parameters
  2. ‘inter’ parameter
  3. ‘breaks’ parameter

The ‘start’ and ‘end’ parameters are straightforward, the user can manually enter start and end dates for the individual patient. If no start and end dates are inputted, the default values are … something … .

The ‘inter’ parameter allows for the specification of regular interval windows in which the metric should be computed. When using the ‘inter’ parameter, the user should be intentional with their choice of ‘cut_reference’ value. The intervals are computed based on the start date or end date depending on the choice of ‘cut_reference’ value.

Example 1: start = “default”, end = “default”, inter = 14, breaks = NULL, cut_reference = “end”

Use of ‘inter’ parameter with default ‘start ’and ’end’ points
Use of ‘inter’ parameter with default ‘start ’and ’end’ points

The ‘breaks’ parameter allows metrics to be computed at different time points, e.g. 1 month, 2 months, 6 months, 12 months.

Example 2: start = “default”, end = “default”, breaks = c(0, 1, 3, 6, 12)

Use of ‘breaks’ parameter with default ‘start ’and ’end’ points
Use of ‘breaks’ parameter with default ‘start ’and ’end’ points

Example 3:

  df_dex <- read_dexcom("~/Desktop/R Workspace/4T/external files/4T.399_Clarity_Export_00123_Doe_John_2024-05-01_162849.csv")
  fourT::compute_gmi(df_dex = df_dex, start = "default", end = "default", inter = 14, breaks = c(0, 1, 3, 6, 12))
#> Error in fourT::compute_gmi(df_dex = df_dex, start = "default", end = "default", : unused argument (inter = 14)

Both ‘inter’ and ‘breaks’ are specified, which is not allowed.

Visualization functions

Helper functions

The only helper function currently in the package is the ‘read_dexcom’ function. This reads a patient .csv file, removes sensitive patient health information and converts the file into the correct format to apply computation and visualization functions.

Development

Next Steps for fourT Package


  1. Prahalad, P., Scheinker, D., Desai, M. et al. Equitable implementation of a precision digital health program for glucose management in individuals with newly diagnosed type 1 diabetes. Nat Med 30, 2067–2075 (2024). https://doi.org/10.1038/s41591-024-02975-y↩︎